<template>
    <el-image
        v-if="value"
        :style="imageStyle"
        :src="formatOssUrl({url:value,suffix: formatOssUrlSuffix})"
        :preview-src-list="[value]">
    </el-image>
</template>

<script>
import {formatOssUrl} from "../../../core.js";

export default {
    name: "SksImageUseImgUrl",
    props:{
        value: [String],
        imageStyle:{
            type: String,
            default: 'width:100px;height:100px;'
        },
        formatOssUrlSuffix:{
            type: String,
            default: 'x-oss-process=image/resize,m_pad,h_100,w_100'
        },

    },
    methods:{
        formatOssUrl({url,suffix}={}){
           return formatOssUrl({
               url:url,
               suffix:suffix,
           })
        }
    }
}
</script>

<style scoped>

</style>

<!--
    <sksImageUseImgUrl v-model="scope.row[item.prop]"/>
-->
